import request from '@/config/axios'
import { MerchantListParams } from './types'

// 商户列表
export const merchantListApi = (params: MerchantListParams) => {
  return request.get({ url: '/merchant/page', params })
}

// 商户入驻申请列表
export const merchantEnterListApi = (params) => {
  return request.get({ url: '/merchantEnterApply/page', params })
}

// 关联商家列表
export const merchantRelationBusinessListApi = (params: MerchantListParams) => {
  return request.get({ url: '/merchant/pageRelationBusiness', params })
}

// 商户详情
export const merchantDetailsApi = (id) => {
  return request.get({ url: '/merchant/details', params: { id } })
}

// 商户入驻详情
export const merchantEnterDetailsApi = (id) => {
  return request.get({ url: '/merchantEnterApply/details', params: { id } })
}

// 商家关联商户列表
export const pageRelationMerchantApi = (params) => {
  return request.get({ url: '/business/pageRelationMerchant', params })
}
